<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Title</title>
    <%@ include file="common.jsp" %>
    <script type="text/javascript" src="/static/js/client.js"></script>
</head>
<body>


<%--显示统计--%>
<table>
    <tr>
        <td>
            <div id="p" class="easyui-panel" style="width:250px;height:200px;background-color: #00bbee" border="0">
                <p style="font-size:14px">今日过生日的会员</p>
                <p style="font-size:25px ;" align="center"><span style="color: red"><i id="bircount">0</i>&nbsp;位</span>
                </p>
                <p style="font-size:14px">本月共有<span style="color: red"><i id="bimcount">0</i>&nbsp;位</span>为会员过生日</p>
            </div>
        </td>

        <td>

            <div class="easyui-panel" style="width:250px;height:200px;background-color: yellow" border="0">
                <p style="font-size:14px">会员总数</p>
                <p style="font-size:25px ;" align="center"><span style="color: red"><i
                        id="totalClient">0</i>&nbsp;位</span>
                </p>
                <p style="font-size:14px">平均每日新增<span style="color: red"><i id="average">0</i></span>&nbsp;位会员</p>
            </div>
        </td>
        <td>
            <div class="easyui-panel" style="width:250px;height:200px;background-color: #00ee00" border="0">
                <p style="font-size:14px">累计消费</p>
                <p style="font-size:25px ;" align="center"><span style="color: red"><i
                        id="totalExpense">0</i>&nbsp;元</span>
                </p>
                <p style="font-size:14px">共<span style="color: red"><i id="totalCount">0</i></span>
                    笔</p>
            </div>
        </td>
        <td>
            <div class="easyui-panel" style="width:250px;height:200px;background-color: orchid" border="0">
                <p style="font-size:25px ;" align="center">消费<span style="color: red"><i>TOP3&nbsp;</i></span>&nbsp;会员
                </p>
                <div id="top_datagrid" class="easyui-datagrid"></div>
            </div>
        </td>
    </tr>
</table>

<%--会员列表--%>
<table id="client_datagrid" class="easyui-panel"></table>

<%--会员列表toolbar--%>
<div id="client_toolbar">
    <a class="easyui-linkbutton" data-options="plain:'true',iconCls:'icon-add'" data-method="add">新增</a>
    <a class="easyui-linkbutton" data-options="plain:'true',iconCls:'icon-edit'" data-method="edit">编辑</a>
    <a class="easyui-linkbutton" data-options="plain:'true',iconCls:'icon-remove'" data-method="remove">删除</a>
    <a class="easyui-linkbutton" iconCls="icon-reload" plain="true" data-method="reload">刷新</a>
    <input id="keyword" name="keyword" class="easyui-searchbox" data-options="prompt:'输入卡号或者姓名'" style="width:100px"/>

    <a class="easyui-linkbutton" iconCls="icon-redo" plain="true" data-method="export">导出</a>
    <a class="easyui-linkbutton" iconCls="icon-undo" plain="true" data-method="import">导入</a>

</div>
<%--编辑弹出框--%>
<div id="client_dialog">
    <form id="client_form" method="post">
        <input type="hidden" name="id" id="clientId">
        <table align="center">
            <tr>
                <td>卡号:</td>
                <td><input name="number" class="easyui-numberbox"
                           validType="remote['/client/validateByNumber.do?id='+clientId.value,'number']"
                           invalidMessage="卡号已存在"/></td>
                <td>姓名</td>
                <td><input name="name" class="easyui-textbox"
                           validType="remote['/client/validateByName.do?id='+clientId.value,'name']"
                           invalidMessage="会员名称名已存在"/></td>
            </tr>
            <tr>
                <td>生日</td>
                <td><input name="birthday" class="easyui-datebox" editable='false'/></td>
                <td>等级</td>
                <td><input name="level" class="easyui-combobox" panelHeight="auto"
                           data-options="valueField:'name',textField:'name',url:'/dataDictionaryItem/query.do?sn=level'"/></td>
            </tr>
            <tr>
                <td>性别:</td>
                <td><input name="sex" class="easyui-combobox" panelHeight="auto"
                           data-options="valueField:'text',textField:'text',data:[{text:'男'},{text:'女'}]"/></td>
                <td>电话</td>
                <td><input name="tel" class="easyui-numberbox"/></td>
            </tr>
            <tr>
                <td>邮箱</td>
                <td><input name="email" class="easyui-textbox"/></td>
                <td>地址</td>
                <td><input name="address" class="easyui-textbox"/></td>
            </tr>
            <tr id="password_tr">
                <td>密码</td>
                <td><input name="password" class="easyui-passwordbox"/></td>
            </tr>
        </table>
    </form>
</div>
<%--导入数据弹出框--%>
<div id="client_importData" style="margin-top: 15px" align="center">
    <form method="post" action="/client/importData.do" id="file_form" enctype="multipart/form-data">
        <input type="file" name="file" ><br/>
        <span class="importDataMsg"></span>
    </form>
</div>

</body>
</html>
